sharepoint enterprise | 您所在的位置:网站首页 › type error undefined is not a function › sharepoint enterprise |
It seems that sp.js is not yet loaded when SP.ClientContext is being called. Use SP.SOD.executeFunc to ensure that the specified file that contains the specified function is loaded and then runs the specified callback function. You could try to enclose your code like this: SP.SOD.executeFunc('SP.js', 'SP.ClientContext', function() { var webUrl = _spPageContextInfo.webAbsoluteUrl; var context = new SP.ClientContext(webUrl); //... }); |
CopyRight 2018-2019 实验室设备网 版权所有 |